The present invention relates to the recovery of compressed digital data, and more particularly, to a device and method for decoding header information in macroblock-based encoded digital signals transmitted over error-prone channels.
Recently, demands for full motion video in such applications as video telephony, video conferencing, and/or multimedia applications have required that standards be introduced for motion video on computer and related systems. Such applications have required development of compression techniques which can reproduce the amount of data required to represent a moving image and corresponding sound to manageable lengths in order to, for example, facilitate data transmission using conventional communications hardware.
Variable-length coding is a coding technique often used for lossless data compression. In accordance with this technique, an 8xc3x978 block of pixels of the video data is converted into discrete cosine transform (xe2x80x9cDCTxe2x80x9d) coefficients. The DCT coefficients are then quantized by quantization factors. The quantized DCT coefficients are Huffman encoded to form Huffman codewords. Such an encoding of the video data contained in the bitstreams is commonly used to construct a minimum redundant variable-length code for a known data statistic.
One set of standards using Huffman encoding for compression of motion picture video images for transmission or storage is known as the Motion Picture Experts Group (xe2x80x9cMPEGxe2x80x9d) set of standards. Each MPEG standard is an international standard for the compression of motion video pictures and audio. The MPEG standards allow motion picture video to be compressed along with the corresponding high quality sound and provide other features such as single frame advance, reverse motion, and still frame video.
The decoding and processing of the MPEG video bitstreams are critical to the performance of any MPEG decoding system. The compressed MPEG video bitstreams contain the various parameters needed in the reconstruction of the audio and video data. The MPEG bitstream can easily be divided into two bitstreams, audio and video. The MPEG video bitsream consists of the video parameters, as well as the actual compressed video data.
Two versions of the MPEG video standard which have received widespread adoption are commonly known as the MPEG-1 and MPEG-2 standards. In general, the MPEG-2 standard has higher resolution than the MPEG-1 standard and enables broadcast transmission at a rate of 4-6 Mbps. In addition to the MPEG-1 and MPEG-2 standards, a proposed MPEG-4 standard is currently being standardized by the ISO/IEC. The MPEG4 standard is intended to facilitate, for example, content-based interactivity and certain wireless applications.
The video codecs specified by the standards provide compression of a digital video sequence by utilizing a block motion-compensated DCT. In a first block-matching step of the DCT process, an algorithm estimates and compensates for the motion that occurs between two temporally adjacent frames. The frames are then compensated for the estimated motion and compared to form a difference image. By taking the difference between the two temporally adjacent frames, all existing temporal redundancy is removed. The only information that remains is new information that could not be compensated for in the motion estimation and compensation algorithm.
In a second step, this new information is transformed into the frequency domain using the DCT. The DCT has the property of compacting the energy of this new information into a few low frequency components. Further compression of the video sequence is obtained by limiting the amount of high frequency information encoded.
The majority of the compression provided by this approach to video encoding is obtained by the motion estimation and compensation algorithm. That is, it has been found to be more efficient to transmit information regarding the motion that exists in a video sequence, as opposed to information about the intensity and color. The motion information is represented using vectors which point from a particular location in the current intensity frame to where that same location originated in the previous intensity frame. For block-matching, the locations are predetermined non-overlapping blocks of equal size called macroblocks (xe2x80x9cMBsxe2x80x9d). All pixels contained in a MB are assumed to have the same motion. The motion vector associated with a particular MB in the present frame of a video sequence is found by searching over a predetermined search are in the previous temporally adjacent frame for a best match. The motion vector points from the center of the MB in the current frame to the center of the block which provides the best match in the previous frame.
Utilizing the estimated motion vectors, a copy of the previous frame is altered by each vector to produce a prediction of the current frame. This operation is referred to as motion compensation. As described above, each predicted MB is subtracted from the current MB to produce a differential MB which is transformed into the spatial frequency domain by the DCT. These spatial frequency coefficients are quantized and entropy encoded providing further compression of the original video sequence. The motion vectors are compressed using differential pulse code modulation (xe2x80x9cDCPMxe2x80x9d), and entropy encoding. Both the motion vectors and the DCT coefficients are transmitted to the decoder, where the inverse operations are performed to produce the decoded video sequence. Because the video codecs specified by the standards are very efficient at removing all but the most essential information, any errors in the reconstruction process effected by the decoder result in a portion of the video being constructed incorrectly.
Efforts have been made to design the MPEG4 standard to be particularly robust in its ability to accommodate transmission errors in order to allow accessing of image or video information over a wide range of storage and transmission media. In this regard a number of different types of tools have been developed to enhance the error resiliency of the MPEG4 standard. These tools may be characterized as relating to resynchronization, data recovery and error concealment. In a particular error resilient mode of the MPEG4 standard, fixed length packets separated by resynchronization markers are used to transmit the video data. Within each packet, header information for the packet is placed in an initial packet segment and the actual encoded video data occupies the remainder of the packet. Information contained in the header portion of the packet includes and index to the first MB in the packet, quantization information, information concerning macroblock type and coded block pattern for chrominance (xe2x80x9cMCBPCxe2x80x9d), and motion information.
Detection, location and correction of any errors present in the header information is crucial to ensuring that the decoded video information is of sufficient quality. This is particularly important in the context of wireless communication systems, which operate in particularly error-prone environments.
Briefly, therefore, this invention provides for a method and apparatus for decoding encoded parameter data included within a packet containing encoded video data. The inventive method contemplates determining, from information within the packet, a bit length L of the encoded parameter data. A number N of codewords for use in decoding the encoded parameter data is also determined. Candidate sequences of N codewords are then compared to the encoded parameter data in accordance with a predetermined distortion metric. An optimized sequence of N codewords is selected from the candidate sequences based upon predefined criteria related to the distortion metric. The optimized sequence collectively has a number of bits equivalent to the bit length L and is usable in decoding the encoded video data.
A first of the candidate sequences of N codewords is preferably generated by selecting a first codeword hypothesis and determining a first conditionally optimal sequence of Nxe2x88x921 codewords associated with the first codeword hypothesis. Other candidate sequences are then generated by selecting different codeword hypotheses and determining associated conditionally optimal sequences of Nxe2x88x921 codewords.